﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Randata.Test
{
    [TestClass]
    public class DoubleTest
    {

        [TestMethod]
        public void DoubleDataProvider_Should_work()
        {
            double d = DataProvider.Any<double>();
        }

        [TestMethod]
        public void DoubleDataProvider_Should_give_diferent_values()
        {
            double d1 = DataProvider.Any<double>();

            double d2 = DataProvider.Any<double>();

            Assert.AreNotEqual(d1, d2, "The values must to be diferents.");
        }

        [TestMethod]
        public void DoubleDataProvider_Should_not_be_a_integer()
        {
            double d = DataProvider.Any<double>();

            int aux = (int)d;

            Assert.AreNotEqual(d - aux, 0, "The value must be a real, not an integer.");
        }

    }
}
